package com.ds.infrastructure.hyperspace.common;

/**
 * Extension for rule compute
 * @author  Weishaoying
 */
public interface Operator {

    String OR_DELIMITER = "|";

    /**
     * Prepare args
     * @param args
     * @return
     */
    default String[] prepareArgs(String[] args) {
        return args;
    }

    /**
     * Compute result
     * @param inputValue
     * @param args
     * @return
     */
    String compute(String inputValue, String[] args);

    /**
     * The name for Operator
     * @return
     */
    String getOperatorName();

    /**
     * Get operator args length
     * @return
     */
    int getOperatorArgsLength();

}
